package com.springboot.java.design.builder;

/**
 * @version v1.0
 * @Description: 建造者模式测试
 * @Author: TongRui乀
 * @Date: 2021/9/3 3:58 下午
 */
public class BuilderTest {

    public static void main(String[] args) {

        // HeroDirector  构建指挥者
        Hero hero = new HeroDirector(new TigerHeroBuilder()).build();

        System.out.println(hero);

        System.out.println(User.userBuilder().userName("小明").address("北京").build());

        System.out.println(User2.builder().userName("小红").address("beijing").gender("girl").build());
    }
}
